home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Autodocs1.3 / DevicesA-K / gameport.doc < prev    next >
Text File  |  1988-10-16  |  6KB  |  202 lines

  1. TABLE OF CONTENTS
  2.  
  3. gameport.device/CMD_CLEAR
  4. gameport.device/GPD_ASKCTYPE
  5. gameport.device/GPD_ASKTRIGGER
  6. gameport.device/GPD_READEVENT
  7. gameport.device/GPD_SETCTYPE
  8. gameport.device/GPD_SETTRIGGER
  9.  
  10.  
  11. gameport.device/CMD_CLEAR                    gameport.device/CMD_CLEAR
  12.  
  13.    NAME
  14.     CMD_CLEAR - clear gameport input buffer
  15.  
  16.    FUNCTION
  17.     Remove from the input buffer any gameport reports waiting to
  18.     satisfy read requests.
  19.  
  20.    IO REQUEST
  21.     io_Message    mn_ReplyPort set if quick I/O is not possible
  22.     io_Device    preset by the call to OpenDevice
  23.     io_Unit        preset by the call to OpenDevice
  24.     io_Command    CMD_CLEAR
  25.     io_Flags    IOB_QUICK set if quick I/O is possible
  26.  
  27.  
  28. gameport.device/GPD_ASKCTYPE               gameport.device/GPD_ASKCTYPE
  29.  
  30.    NAME
  31.     GPD_ASKCTYPE - inquire the current game port controller type
  32.  
  33.    FUNCTION
  34.     This command identifies the type of controller at the game
  35.     port, so that the signals at the port may be properly
  36.     interpreted.  The controller type has been set by a previous
  37.     GPD_SETCTYPE.
  38.  
  39.     This command always executes immediately.
  40.  
  41.    IO REQUEST
  42.     io_Message    mn_ReplyPort set if quick I/O is not possible
  43.     io_Device    preset by the call to OpenDevice
  44.     io_Unit        preset by the call to OpenDevice
  45.     io_Command    GPD_ASKCTYPE
  46.     io_Flags    IOB_QUICK set if quick I/O is possible
  47.     io_Length    at least 1
  48.     io_Data        the address of the byte variable for the
  49.             result
  50.  
  51.  
  52. gameport.device/GPD_ASKTRIGGER           gameport.device/GPD_ASKTRIGGER
  53.  
  54.    NAME
  55.     GPD_ASKTRIGGER - inquire the conditions for a game port report
  56.  
  57.    FUNCTION
  58.     This command inquires what conditions must be met by a game
  59.     port unit before a pending Read request will be satisfied.
  60.     These conditions, called triggers, are independent -- that
  61.     any one occurs is sufficient to queue a game port report to
  62.     the Read queue.     These conditions are set by GPD_SETTRIGGER.
  63.  
  64.     This command always executes immediately.
  65.  
  66.    IO REQUEST
  67.     io_Message    mn_ReplyPort set if quick I/O is not possible
  68.     io_Device    preset by the call to OpenDevice
  69.     io_Unit        preset by the call to OpenDevice
  70.     io_Command    GPD_ASKTRIGGER
  71.     io_Flags    IOB_QUICK set if quick I/O is possible
  72.     io_Length    sizeof(gameportTrigger)
  73.     io_Data        a structure of type GameportTrigger, which
  74.             has the following elements
  75.         gpt_Keys -
  76.             GPTB_DOWNKEYS set if button down transitions
  77.             trigger a report, and GPTB_UPKEYS set if button up
  78.             transitions trigger a report
  79.         gpt_Timeout    -
  80.             a time which, if exceeded, triggers a report;
  81.             measured in vertical blank units (60/sec)
  82.         gpt_XDelta    -
  83.             a distance in x which, if exceeded, triggers a
  84.             report
  85.         gpt_YDelta    -
  86.             a distance in x which, if exceeded, triggers a
  87.             report
  88.  
  89.  
  90. gameport.device/GPD_READEVENT             gameport.device/GPD_READEVENT
  91.  
  92.    NAME
  93.     GPD_READEVENT - return the next game port event.
  94.  
  95.    FUNCTION
  96.     Read game port events from the game port and put them in the
  97.     data area of the iORequest.  If there are no pending game port
  98.     events, this command will not be satisfied, but if there are
  99.     some events, but not as many as can fill IO_LENGTH, the
  100.     request will be satisfied with those currently available.
  101.  
  102.    IO REQUEST
  103.     io_Message    mn_ReplyPort set if quick I/O is not possible
  104.     io_Device    preset by the call to OpenDevice
  105.     io_Unit        preset by the call to OpenDevice
  106.     io_Command    GPD_READEVENT
  107.     io_Flags    IOB_QUICK set if quick I/O is possible
  108.     io_Length    the size of the io_Data area in bytes: there
  109.             are sizeof(inputEvent) bytes per input event.
  110.     io_Data        a buffer area to fill with input events.  The
  111.             fields of the input event are:
  112.         ie_NextEvent
  113.             links the events returned
  114.         ie_Class
  115.             is IECLASS_RAWMOUSE
  116.         ie_SubClass
  117.             is 0 for the left, 1 for the right game port
  118.         ie_Code 
  119.             contains any gameport button reports.  No
  120.             report is indicated by the value 0xff.
  121.         ie_Qualifier 
  122.             only the relative and button bits are set
  123.         ie_X, ie_Y
  124.             the x and y values for this report, in either
  125.             relative or absolute device dependent units.
  126.         ie_TimeStamp 
  127.             the delta time since the last report, given
  128.             not as a standard timestamp, but as the frame
  129.             count in the TV_SECS field.
  130.  
  131.    RESULTS
  132.     This function sets the error field in the iORequest, and fills
  133.     the iORequest with the next game port events (but not partial
  134.     events).
  135.  
  136.    SEE ALSO
  137.     gameport.device/GPD_SETCTYPE, gameport.device/GPD_SETTRIGGER
  138.  
  139.  
  140. gameport.device/GPD_SETCTYPE               gameport.device/GPD_SETCTYPE
  141.  
  142.    NAME
  143.     GPD_SETCTYPE - set the current game port controller type
  144.  
  145.    FUNCTION
  146.     This command sets the type of device at the game port, so that
  147.     the signals at the port may be properly interpreted.  The port
  148.     can also be turned off, so that no reports are generated.
  149.  
  150.     This command always executes immediately.
  151.  
  152.    IO REQUEST
  153.     io_Message    mn_ReplyPort set if quick I/O is not possible
  154.     io_Device    preset by the call to OpenDevice
  155.     io_Unit        preset by the call to OpenDevice
  156.     io_Command    GPD_SETCTYPE
  157.     io_Flags    IOB_QUICK set if quick I/O is possible
  158.     io_Length    1
  159.     io_Data        the address of the byte variable describing
  160.             the controller type, as per the equates in
  161.             the gameport include file
  162.  
  163.  
  164. gameport.device/GPD_SETTRIGGER           gameport.device/GPD_SETTRIGGER
  165.  
  166.    NAME
  167.     GPD_SETTRIGGER - set the conditions for a game port report
  168.  
  169.    FUNCTION
  170.     This command sets what conditions must be met by a game
  171.     port unit before a pending Read request will be satisfied.
  172.     These conditions, called triggers, are independent -- that
  173.     any one occurs is sufficient to queue a game port report to
  174.     the Read queue.     These conditions are inquired with
  175.     GPD_ASKTRIGGER.
  176.  
  177.     This command always executes immediately.
  178.  
  179.    IO REQUEST
  180.     io_Message    mn_ReplyPort set if quick I/O is not possible
  181.     io_Device    preset by the call to OpenDevice
  182.     io_Unit        preset by the call to OpenDevice
  183.     io_Command    GPD_SETTRIGGER
  184.     io_Flags    IOB_QUICK set if quick I/O is possible
  185.     io_Length    sizeof(gameportTrigger)
  186.     io_Data        a structure of type GameportTrigger, which
  187.             has the following elements
  188.         gpt_Keys -
  189.             GPTB_DOWNKEYS set if button down transitions
  190.             trigger a report, and GPTB_UPKEYS set if button up
  191.             transitions trigger a report
  192.         gpt_Timeout    -
  193.             a time which, if exceeded, triggers a report;
  194.             measured in vertical blank units (60/sec)
  195.         gpt_XDelta    -
  196.             a distance in x which, if exceeded, triggers a
  197.             report
  198.         gpt_YDelta    -
  199.             a distance in x which, if exceeded, triggers a
  200.             report
  201.  
  202.